﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="QuesPage.aspx.cs" Inherits="enQuesPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        body
        {
            margin: 0 auto;
            text-align:center;
            font-size: 12px;
        }
        table
        {
            border-collapse: collapse;
        }
        #divContainer
        {
        	margin: 0 auto;
            text-align:left;
            width: 770px;
        }
        #divTitle1
        {
            height: 25px;
            line-height: 25px;
            vertical-align: middle;
            background: url('images/bg_Title.jpg') repeat-x bottom;
        }
        .divTitle
        {
            height: 30px;
            line-height: 30px;
            vertical-align: middle;
        }
        .divTitle span
        {
            font-weight: bold;
        }
        #tblEdit
        {
            font-size: 12px;
            line-height: 30px;
        }
        .optionName
        {
            width: 25px;
        }
        .tdTitle
        {
            width: 50px;
            text-align: right;
        }
        .gvStyle, .gvStyle th, .gvStyle td
        {
            line-height: 19px;
            border: solid 1px black;
        }
        .gvStyle td table td
        {
            border: none;
        }
        a
        {
            color: Red;
        }
        a:visited
        {
            color: Red;
        }
    </style>

    <script src="Script/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script type="text/javascript" language="javascript">
        $(
        //隐藏阅读内容文本框
        function() { $("#trRead").hide(); }
        )
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div id="divContainer">
        <div class="divTitle">
            <span>现有试卷&gt;&gt;</span></div>
        <div id="divBrowse">
            <asp:GridView ID="gvExam" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                Font-Size="12px" PageSize="8" Width="100%" DataKeyNames="examNum" OnSelectedIndexChanging="gvExam_SelectedIndexChanging"
                OnPageIndexChanging="gvExam_PageIndexChanging" CssClass="gvStyle">
                <RowStyle HorizontalAlign="Left" />
                <Columns>
                    <asp:BoundField DataField="kmName" HeaderText="科目名称">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle Width="80px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="examNum" HeaderText="试卷编号">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        <ItemStyle Width="55px" HorizontalAlign="Center"></ItemStyle>
                    </asp:BoundField>
                    <asp:HyperLinkField DataNavigateUrlFields="examNum,examName" DataNavigateUrlFormatString="txDesign.aspx?examNum={0}&amp;examName={1}"
                        DataTextField="examName" HeaderText="试卷名称">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" Width="100px" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="totalScore" HeaderText="总分">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle Width="35px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="eligibleScore" HeaderText="合格">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle Width="35px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="examVer" HeaderText="试卷版本">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle Width="80px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="examType" HeaderText="试卷类别">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle Width="80px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="bFB" HeaderText="发布">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle Width="55px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:CommandField ShowSelectButton="True">
                        <HeaderStyle HorizontalAlign="Left" />
                        <ItemStyle Width="30px" HorizontalAlign="Center" />
                    </asp:CommandField>
                </Columns>
                <FooterStyle HorizontalAlign="Left" />
                <SelectedRowStyle BackColor="#CCFFFF" />
                <HeaderStyle HorizontalAlign="Left" />
            </asp:GridView>
        </div>
        <div class="divTitle">
            <span>已有试题&gt;&gt;</span>
        </div>
        <div id="divExist">
            <div class="divTitle" style="text-align: center;">
                <asp:Label ID="labCureExam" runat="server" Text="[请选择试卷]" Font-Size="14px"></asp:Label></div>
            <div id="divQues">
                <asp:GridView CssClass="gvStyle" ID="gvExistQues" runat="server" AutoGenerateColumns="False"
                    ShowHeader="False" Width="100%" OnSelectedIndexChanging="gvExistQues_SelectedIndexChanging1"
                    AllowPaging="True" DataKeyNames="stNum" OnPageIndexChanging="gvExistQues_PageIndexChanging"
                    OnRowDeleting="gvExistQues_RowDeleting" PageSize="5">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <table>
                                    <tr>
                                        <td>
                                            题型：
                                        </td>
                                        <td>
                                            <asp:Label ID="labTX" runat="server" Text='<%# Eval("txName") %>'></asp:Label>&nbsp;&nbsp;
                                            （满分<asp:Label ID="labFull" runat="server" Text=' <%#Eval("fullScore")%>'></asp:Label>分&nbsp;&nbsp;
                                            每题<asp:Label ID="labSingle" runat="server" Text='<%#Eval("singleScore")%> '></asp:Label>分&nbsp;&nbsp;
                                            共<asp:Label ID="labTL" runat="server" Text='<%#Eval("tl")%>'></asp:Label>题&nbsp;&nbsp;
                                            限时<asp:Label ID="labTimeArea" runat="server" Text='<%#Eval("timeArea")%>'></asp:Label>分钟）
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            问题：
                                        </td>
                                        <td>
                                            <asp:Label ID="labTM" runat="server" Text='<%# Eval("stTM") %>'></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="vertical-align: top;">
                                            选项：
                                        </td>
                                        <td>
                                            <table style="width: 100%;">
                                                <tr>
                                                    <td class="optionName">
                                                        A.
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="labA" runat="server" Text='<%# Eval("seleA") %>'></asp:Label>
                                                    </td>
                                                    <td class="optionName">
                                                        B.
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="labB" runat="server" Text='<%# Eval("seleB") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="optionName">
                                                        C.
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="labC" runat="server" Text='<%# Eval("seleC") %>'></asp:Label>
                                                    </td>
                                                    <td class="optionName">
                                                        D.
                                                    </td>
                                                    <td>
                                                        <asp:Label ID="labD" runat="server" Text='<%# Eval("seleD") %>'></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            答案：
                                        </td>
                                        <td>
                                            <asp:Label ID="labDA" runat="server" Text='<%# Eval("result") %>'></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            分析：
                                        </td>
                                        <td>
                                            <asp:Label ID="labFX" runat="server" Text='<%# Eval("analysis") %>'></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowDeleteButton="True" ShowSelectButton="True">
                            <ItemStyle HorizontalAlign="Center" Width="55px" />
                        </asp:CommandField>
                    </Columns>
                    <SelectedRowStyle BackColor="#CCFFFF" />
                </asp:GridView>
            </div>
        </div>
        <div class="divTitle">
            <span>新建试题&gt;&gt;</span>
        </div>
        <div>
            <div>
                <table id="tblNew" style="width: 100%;">
                    <tr>
                        <td class="tdTitle">
                            题型：
                        </td>
                        <td style="width: 420px;">
                            <asp:DropDownList ID="dropTX" Width="410px" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td>
                            （如果选项为空，请设计题型！）
                        </td>
                    </tr>
                    <tr>
                        <td class="tdTitle" style="vertical-align: top;">
                            问题：
                        </td>
                        <td>
                            <asp:TextBox ID="txtTM" runat="server" Font-Size="12px" TextMode="MultiLine" Height="50px"
                                Width="400px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="tdTitle">
                            选项A：
                        </td>
                        <td>
                            <asp:TextBox ID="txtA" runat="server" Font-Size="12px" Width="400px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="tdTitle">
                            选项B：
                        </td>
                        <td>
                            <asp:TextBox ID="txtB" runat="server" Font-Size="12px" Width="400px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="tdTitle">
                            选项C：
                        </td>
                        <td>
                            <asp:TextBox ID="txtC" runat="server" Font-Size="12px" Width="400px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="tdTitle">
                            选项D：
                        </td>
                        <td>
                            <asp:TextBox ID="txtD" runat="server" Font-Size="12px" Width="400px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="tdTitle">
                            答案：
                        </td>
                        <td>
                            <asp:TextBox ID="txtDA" runat="server" Font-Size="12px" Width="400px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="tdTitle">
                            分析：
                        </td>
                        <td>
                            <asp:TextBox ID="txtFX" runat="server" Font-Size="12px" Width="400px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnRefur" runat="server" Text="添加" OnClick="btnRefur_Click" />
                        </td>
                        <td>
                            <asp:Button ID="btnCancel" runat="server" Text="取消" OnClick="btnCancel_Click" />
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
